import request from '@/utils/request'

// 查询采购比价列表
export function listBuyComparePrice(query) {
  return request({
    url: '/caigou/buyComparePrice/list',
    method: 'get',
    params: query
  })
}

// 查询采购比价详细
export function getBuyComparePrice(id) {
  return request({
    url: '/caigou/buyComparePrice/' + id,
    method: 'get'
  })
}
export function getBuyComparePriceInfo(id) {
  return request({
    url: '/caigou/buyComparePrice/info/' + id,
    method: 'get'
  })
}

// 新增采购比价
export function addBuyComparePrice(data) {
  return request({
    url: '/caigou/buyComparePrice',
    method: 'post',
    data: data
  })
}
export function addBuyComparePricePlus(data) {
  return request({
    url: '/caigou/buyComparePrice/add',
    method: 'post',
    data: data
  })
}

// 修改采购比价
export function updateBuyComparePrice(data) {
  return request({
    url: '/caigou/buyComparePrice',
    method: 'put',
    data: data
  })
}
export function updateBuyComparePricePlus(data) {
  return request({
    url: '/caigou/buyComparePrice/upd',
    method: 'put',
    data: data
  })
}

// 删除采购比价
export function delBuyComparePrice(id) {
  return request({
    url: '/caigou/buyComparePrice/' + id,
    method: 'delete'
  })
}
